mod expr;
mod lexer;

pub fn calc(input: &str) -> Result<f64, Box<dyn std::error::Error>> {
    let exp = expr::Expr::new(input)?;
    Ok(exp.eval())
}
